/**
 * @View
 * @class       : NewsShow.js
 * @author : Mustapha FERHAN
 * @function    : News Show
 */

radio.views.NewsShow = Ext.extend(Ext.Panel, {
	id : "newsShow",
	layout :"fit",
	dockedItems : [

	{

		xtype : 'toolbar',
		title : "News_Show",
		items : [ {
			xtype : 'button',
			text : "Back",
			ui : 'back',
			handler : function() {

				Ext.dispatch( {
					controller : 'home',
					action : 'index',
					animation : {
						type : 'slide',
						direction : 'right'
					}
				});

			},
			scope : this
		}, {
			xtype : "spacer"
		} ]

	} ],
	tpl : new Ext.XTemplate(
			

			'<div class="" style="color:#ffffff";>', 
										
			'<div style="width:100%;height:200px; text-align:left; background-repeat:no-repeat; background-position:50% 50%; background-size: 100%; background-image:url(\'{photo}\');"/>',
			'</div>',
			
			'<div style="font-weight: bold; padding:8px;  background-color:#333;"><span style="color:#F00; font-weight:bold;">{title}</span></div>',			
			
			'<div style="text-align:right; font-size: 0.8em; background-color:#333; padding:4px 8px 4px 8px;">{datesStorage}</div>',
			'<div style="display: block; padding:8px; background-image:url(\'ressources/img/opacitybg.png\')">{desc}</div>',
			'</div>',
			'<div style="display: block; padding:8px; font-size: 0.8em; color:white; background-image:url(\'mobileRIA/ressources/img/opacitybg.png\')">{body}</div>',
			'</div>'),
			scroll : "vertical",
			fullscreen: true,
			
			
			
			/*'<div class="" style="color:#ffffff";>', '<h2>{title}</h2>',
			'<p ><p>{date}</p>', '<p>{auteur}</p>',
			'<img class="borderImg" src="'+p.sph()+'{photo}" width="200" heigh="200"/></br>',
			'<p>{desc}</p>',
			'</p></div>'),*/

	initComponent : function() {
		radio.views.NewsShow.superclass.initComponent.apply(this, arguments);
	}
});

Ext.reg('NewsShow', radio.views.NewsShow);